import request from "../utils/request";

//发布信息
export function addNotice(data) {
    return request({
        url: '/notice/AddNotice',
        method: 'post',
        data
    })
}
//得到所有的提示通过接受者id
export function getAllNoticesByRecipientId(id) {
    return request({
        url: '/notice/GetAllNoticesByRecipientId',
        method: 'get',
        params: { id }
    })
}

//加载信息通过页数和页面大小
export function getNoticeByPageNumberAndPageSizeAndRecipientId(pageNumber,pageSize,recipientId) {
    return request({
        url: '/notice/GetNoticeByPageNumberAndPageSizeAndRecipientId',
        method: 'get',
        params: { pageNumber,pageSize,recipientId }
    })
}
 //查询信息的总条数
export function countTotalNoticeByRecipientId(recipientId) {
    return request({
        url: '/notice/CountTotalNoticeByRecipientId',
        method: 'get',
        params: {recipientId}
    })
}

